import request from '@/utils/request'
import {projectApiUrl} from './config'
/**
 * 节点管控列表
 * @param parameter
 */
export function getConstructionsList(parameter){
  return request({
    url: projectApiUrl+'/construction/nodeControl',
    method: 'get',
    params: parameter
  })
}

/**
 * 查看节点管控详情
 * @param typeId
 */
export function getConstructionsOne(nodeId){
  return request({
    url: projectApiUrl+'/construction/nodeControl/'+nodeId,
    method: 'get',
    nodeId
  })
}

/**
 * 新增节点管控
 * @param data
 */
export function addConstructions(data){
  return request({
    url: projectApiUrl+'/construction/nodeControl',
    method: 'post',
    data: data
  })
}

/**
 * 编辑节点管控
 * @param data
 */
export function editConstructions(data){
  return request({
    url: projectApiUrl+'/construction/nodeControl/update-nodeControl',
    method: 'post',
    data: data
  })
}


/**
 * 节点基本详情
 * @param parameter
 */
export function getNodeDetails(planId){
  return request({
    url: projectApiUrl+'/construction/details/'+ planId,
    method: 'get',
    planId
  })
}


/**
 * 施工进度总计划看板
 * @param parameter
 */
export function getMasterPlan(data){
  return request({
    url: projectApiUrl+'/construction/master-plan',
    method: 'get',
    data:data
  })
}

/**
 * 施工进度总计划节点详情
 * @param parameter
 */
export function getNodeDeltails(data){
  return request({
    url: projectApiUrl+'/construction/node-total',
    method: 'get',
    data:data
  })
}